using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace vlcplay.Converters
{
    public class BoolToMarginConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool isMaximized = (bool)value;
            return isMaximized ? double.NaN : System.Convert.ToDouble(parameter ?? 400);
        }
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
            => throw new NotImplementedException();
    }
}